using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace thirteen
{
    /// <summary>
    /// generate by msg tool
    /// 玩家总结算信息
    /// </summary>
	public class PlayerBillInfo : Dto
	{
		//玩家id
		public long playerId;
		//微信昵称
		public String nickName;
		//结算筹码(包含喜钱)
		public long cedit;

        public PlayerBillInfo() { }

        public PlayerBillInfo(long playerId, String nickName, long cedit)
        {
            this.playerId = playerId;
            this.nickName = nickName;
            this.cedit = cedit;
        }

        
		public void write(object obj)
		{
			ByteBuffer b = obj as ByteBuffer;
			b.PushLong(playerId);
			b.PushString(nickName);
			b.PushLong(cedit);
			
		}

	    public void read(object obj)
		{
		    MyConverter b = obj as MyConverter;
			playerId = b.toInt64();
			nickName = b.toString();
			cedit = b.toInt64();
			
		}

	}
}